package org.onvivals.module.ums.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.onvivals.common.base.BaseEntity;

import java.io.Serial;

@Getter
@Setter
@Accessors(chain = true)
@TableName("ums_notice")
@Schema(description="公告")
public class UmsNotice extends BaseEntity<UmsNotice> {

	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * 用户id
	 */
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using= ToStringSerializer.class)
	@Schema(description="id")
	private Long id;

	/**
	 * 标题
	 */
	@TableField(value = "title")
	@Schema(description="标题")
	private String title;

	/**
	 * 排序
	 */
	@TableField(value = "sort")
	@Schema(description="排序")
	private Integer sort;

	/**
	 * 内容
	 */
	@TableField(value = "content")
	@Schema(description="内容")
	private String content;

	/**
	 * 颜色
	 */
	@TableField(value = "color")
	@Schema(description="颜色")
	private String color;

}
